import { functionCommon, requestCommon } from "@ruler3d/common"
import { baseRes } from "../interfaces/api.interface"
import urlFunc from "../utils/host.func"

export default {
  imserverToken: (params: { accid: string; nickname: string; channelName: string; userType: number }) => {
    return requestCommon.get<baseRes<any>>({
      url: `${urlFunc.requestHost("apiHost")}/v1/api/imserver/token`,
      params
    })
  },
  //修改带看状态
  lookStatus: (params: { tempId: string; cid: string; lookStatus: boolean }) => {
    return requestCommon.put<baseRes<any>>({
      url: `${urlFunc.requestHost("apiHost")}/v1/api/imserver/voice/room/look/status`,
      params
    })
  },
  //查询带看状态
  getLookStatus: (params: { tempId: string; cid: string }) => {
    return requestCommon.get<baseRes<any>>({
      url: `${urlFunc.requestHost("apiHost")}/v1/api/imserver/voice/room/look/status`,
      params
    })
  }
}
